import { defHttp } from '/@/utils/http/axios';

enum Api {
  goodsList = '/basic-api/commodity/goods/list',
  goodsDel = '/basic-api/commodity/goods/delete',
  goodsadd = '/basic-api/commodity/goods/add',
  goodsedit = '/basic-api/commodity/goods/edit',
  goodsTypeList = '/basic-api/commodity/category/list',
  goodsTypeAdd = '/basic-api/commodity/category/add',
  goodsTypeUpdate = '/basic-api/commodity/category/edit',
  goodsTypeDelete = '/basic-api/commodity/category/delete',
}

/**
 * @description: user login api
 */
export function goodsListApi(params) {
  // const data: any = {};
  return defHttp.get({
    url: Api.goodsList,
    params,
  });
}

export function goodsDelApi(params) {
  // const data: any = {};
  return defHttp.post({
    url: Api.goodsDel,
    params,
  });
}

export function goodsAddApi(params) {
  // const data: any = {};
  return defHttp.post({
    url: Api.goodsadd,
    params,
  });
}

export function goodsEditApi(params) {
  // const data: any = {};
  return defHttp.post({
    url: Api.goodsedit,
    params,
  });
}

export function goodsTypeListApi(params) {
  // const data: any = {};
  return defHttp.get({
    url: Api.goodsTypeList,
    params,
  });
}

export function goodsTypeAddApi(params) {
  // const data: any = {};
  return defHttp.post({
    url: Api.goodsTypeAdd,
    params,
  });
}

export function goodsTypeUpdateApi(params) {
  // const data: any = {};
  return defHttp.post({
    url: Api.goodsTypeUpdate,
    params,
  });
}

export function goodsTypeDeleteApi(params) {
  // const data: any = {};
  return defHttp.post({
    url: Api.goodsTypeDelete,
    params,
  });
}
